
def moveTower(height, fromPole, toPole, withPole):
    if height >= 1:
        moveTower(height - 1, fromPole, withPole, toPole)
        moveDisk(height, fromPole, toPole)
        moveTower(height - 1, withPole, toPole, fromPole)


def moveDisk(height, fp, tp):
    print("moving disk", height, "from", fp, "to", tp)


if __name__ == "__main__":
    moveTower(5, 1, 2, 3)
